﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HtmlAgilityPack;
using System.IO;

namespace ExtractionTool
{
    public class StatementReader
    {
        public StatementReader(string filePath)
        {
            StatementFile = new FileInfo(filePath);
            
            StatementHtml = new HtmlDocument();
            StatementHtml.OptionFixNestedTags = true;
            StatementHtml.Load(StatementFile.FullName);

            if(StatementHtml.ParseErrors != null && StatementHtml.ParseErrors.Count() > 0)
            {
                // Report any parser errors.
            }
            else
            {
                //HtmlNode bodyNode = StatementHtml.DocumentNode
            }
        }

        public FileInfo StatementFile { get; set; }

        public HtmlDocument StatementHtml { get; set; }
    }
}
